<%@page import="java.util.Date" isELIgnored="false"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>密码修改</title>
	<link rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css">
</head>
<body>
<!-- 修改密码页面 -->
<div class="modifyMM" style="display: flex; justify-content: center; align-items: center; height: 100vh;">
	<div>
		<img src="<%=request.getContextPath() %>/image/login.png" height="150px" width="400px">
		<div class="main_box">
			<div class="findpassword_form">
		<div>
			<% String tokenValue = new Date().getTime() +""; %>
			<c:set value="<%=tokenValue %>" var="token" scope="session"/>
		</div>
		<form action="<%=request.getContextPath()%>/modifyPasswordServlet" method="post">
			<div>
				${sessionScope.message }
				<%session.removeAttribute("message"); %>
			</div>
			<div>
				<input type="hidden" name="token" value="<%=tokenValue %>"/>
			</div>
			<div class="form-group">
				<input type="password" name="oldpassword"  lay-verify="required" placeholder="旧密码" autocomplete="off" class="layui-input" lay-affix="clear">
				<br>
			</div>
			<div class="form-group">
				<input type="password" name="newpassword"  lay-verify="required" placeholder="新密码" autocomplete="off" class="layui-input" lay-affix="clear">
				<br>
			</div>
			<div class="form-group">
				<input type="password" name="confirmpassword"  lay-verify="required" placeholder="确认密码" autocomplete="off" class="layui-input" lay-affix="clear">
				<br>
			</div>
			<div>
				<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="demo-login" type="submit" name="submit">确定</button>
				<br>
				<a href="<%=request.getContextPath() %>/login.jsp" style="float: left; margin-top: 10px;">返回</a>
			</div>
		</form>
			</div>
		</div>
	</div>
</div>

	<script src="layui-v2.8.4/layui/layui.js"></script>
	<link type="text/css" rel="stylesheet" href="layui-v2.8.4/layui/css/layui.css"/>
</body>
</html>